package com.yupi.springbootinit.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.springbootinit.model.dto.supportgrindingrecord.SupportGrindingRecordQueryRequest;
import com.yupi.springbootinit.model.entity.SupportGrindingRecord;
import com.yupi.springbootinit.model.vo.SupportGrindingRecordVO;
import jakarta.servlet.http.HttpServletRequest;


/**
 * 去支撑打磨记录服务
 */
public interface SupportGrindingRecordService extends IService<SupportGrindingRecord> {

    /**
     * 校验数据
     *
     * @param record 记录实体
     * @param add    是否为创建操作
     */
    void validRecord(SupportGrindingRecord record, boolean add);

    /**
     * 获取查询条件
     *
     * @param queryRequest 查询请求
     * @return QueryWrapper
     */
    QueryWrapper<SupportGrindingRecord> getQueryWrapper(SupportGrindingRecordQueryRequest queryRequest);

    /**
     * 获取去支撑打磨记录封装
     *
     * @param record  记录实体
     * @param request HttpServletRequest
     * @return VO对象
     */
    SupportGrindingRecordVO getRecordVO(SupportGrindingRecord record, HttpServletRequest request);

    /**
     * 分页获取去支撑打磨记录封装
     *
     * @param recordPage 分页数据
     * @param request    HttpServletRequest
     * @return VO分页对象
     */
    Page<SupportGrindingRecordVO> getRecordVOPage(Page<SupportGrindingRecord> recordPage, HttpServletRequest request);
}